//
//  UIGraphicsImageRendererFormat.swift
//  Documentation
//
//  Created by Toj on 3/8/24.
//

import Foundation

extension UIGraphicsImageRendererFormat {

    @available(iOS 12.0, *)
    public enum Range : Int, @unchecked Sendable {

        case unspecified = -1

        case automatic = 0

        case extended = 1

        case standard = 2
    }
}

@available(iOS 10.0, *)
open class UIGraphicsImageRendererFormat : UIGraphicsRendererFormat {

    
    open var scale: CGFloat // display scale of the context. The preferredFormat uses the scale most appropriate for the main screen's current configuration.

    open var opaque: Bool // indicates the bitmap context will draw fully opaque. The preferredFormat sets this to NO.

    @available(iOS, introduced: 10.0, deprecated: 12.0, message: "Use the preferredRange property instead")
    open var prefersExtendedRange: Bool // indicates the bitmap context should draw into a context capable of rendering extended color images. The preferredFormat sets this according to the main screen's current configuration.

    
    @available(iOS 12.0, *)
    open var preferredRange: UIGraphicsImageRendererFormat.Range

    
    // Returns a format optimized for the specified trait collection, taking into account properties such as displayScale and displayGamut.
    // Traits that are not specified will be ignored, with their corresponding format properties defaulting to the values in preferredFormat.
    @available(iOS 11.0, *)
    public convenience init(for traitCollection: UITraitCollection)
}

@available(*, unavailable)
extension UIGraphicsImageRendererFormat : @unchecked Sendable {
}
